home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_7 / issue_07 / drawfile / !RendDraw / c / DrawFile next >
Encoding:
Text File  |  1993-09-24  |  1.0 KB  |  47 lines

  1. /*
  2.  * Name  : DrawFile.c
  3.  * Desc  : Veneers for the draw file module
  4.  * Author: James Bye
  5.  * Date  : 21st June 1993
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include "kernel.h"
  11.  
  12. #include "DrawFile.h"
  13.  
  14.  
  15. extern _kernel_oserror *DrawFile_Render ( DrawFile_Flags flags,
  16.                                           DrawFile_Data  data,
  17.                                           int size,
  18.                                           DrawFile_TransMatStr *tm,
  19.                                           DrawFile_ClipBBoxStr *clipbbox,
  20.                                           int x, int y )
  21. {
  22. _kernel_swi_regs r;                                   
  23. DrawFile_TransMatStr transmat;
  24.  
  25.   if(!tm)
  26.   {
  27.     transmat.x0 = 1 << 17;
  28.     transmat.y0 = 0;
  29.     transmat.x1 = 0;
  30.     transmat.y1 = 1 << 17;
  31.     transmat.x2 = 256 * x;
  32.     transmat.y2 = 256 * y;
  33.   }
  34.  
  35.   r.r[0] = flags;
  36.   r.r[1] = (int) data;
  37.   r.r[2] = size;
  38.   if(!tm)
  39.     r.r[3] = (int)&transmat;
  40.   else
  41.     r.r[3] = (int) tm;
  42.   r.r[4] = (int) clipbbox;
  43.  
  44.   return(_kernel_swi(Render,&r,&r));
  45. }
  46.  
  47.